package charpter06;

public class rerrr {

    //??§Õ???main????
    public static void main(String[] args) {

		/*

			    *
			  *  *
			 *    *
			********

		?¡¤????
		???????
		1. ???????????
		*****
		*****
		*****
		*****
		*****
		2. ????????????

		*    	//??1?? ?? 1??*
		**   	//??2?? ?? 2??*
		***		//??3?? ?? 3??*
		****    //??4?? ?? 4??*
		*****   //??5?? ?? 5??*

		3. ?????????????
		*       //??1?? ?? 1??*   2 * 1 -1   ??4=(?????-1)?????
	   ***      //??2?? ?? 3??*   2 * 2 -1   ??3=(?????-2)?????
	  *****     //??3?? ?? 5??*   2 * 3 -1   ??2=(?????-3)?????
	 *******    //??4?? ?? 7??*   2 * 4 -1   ??1=(?????-4)?????
	*********   //??5?? ?? 9??*   2 * 5 -1   ??0=(?????-5)?????

		4. ????????????? [?????]
	    *       //??1?? ?? 1??*   ????§Ö?????¦Ë????*,??????¦Ë?????*
	   * *      //??2?? ?? 2??*   ????§Ö?????¦Ë????*,??????¦Ë?????*
	  *   *     //??3?? ?? 2??*   ????§Ö?????¦Ë????*,??????¦Ë?????*
	 *     *    //??4?? ?? 2??*   ????§Ö?????¦Ë????*,??????¦Ë?????*
	*********   //??5?? ?? 9??*   ??????*

		???????
		5 ??????????? int totalLevel = 5;

	//§³??? ??????¦Ë??????????????§Õ??
		 */
        int totalLevel = 20; //????
        for(int i = 1; i <= totalLevel; i++) { //i ???????

            //?????*??????????? ?????? = ?????-?????
            for(int k = 1; k <= totalLevel - i; k++ ) {
                System.out.print(" ");
            }

            //??????????*????
            for(int j = 1;j <= 2 * i - 1;j++) {
                //????§Ö?????¦Ë????*,??????¦Ë?????*, ????????? *
                if(j == 1 || j == 2 * i - 1 || i == totalLevel) {
                    System.out.print("*");
                } else { //?????????????
                    System.out.print(" ");
                }
            }
            //??????????*?????? println???????
            System.out.println("");
        }
    }
}
